<template>
  <view class="goods_view">
    <view class="goods_round_top_view"></view>
    <view class="goods_line_view"></view>
    <view class="goods_round_bottom_view"></view>

    <view class="goods_info_view">
      <view class="goods_image_view">
        <image class="goods_image" :src="item.src" mode="aspectFill"></image>
      </view>
      <view class="goods_right_view">
        <view class="sell_title">{{item.title}}</view>
        <view class="sell_desc" style="margin-top: 25px;">{{item.address}}</view>
        <view class="sell_desc">{{item.time}}</view>
      </view>
      <view class="ticket_name_view">
        电子票
      </view>
    </view>
    <view class="ticket_view">
      <view class="ticket_left">
        学生票
      </view>
      <view class="ticket_right">
        ￥ 80 x 2张
      </view>
    </view>
  </view>

  <view class="performer_view">
    <view class="performer_top_view">

      <view class="performer_left">
        <view class="performer_name">
          实名观演人
        </view>
        <view class="performer_desc">
          需添加1位，入场须携带相关证件
        </view>
      </view>
      <view class="performer_add">
        添加
      </view>
    </view>

    <view class="performer_item">
      <view class="performer_text">
        张大助
        <text class="idcard">身份证：441***********321X</text>
      </view>
      <radio class="performer_radio" value="r1" />
    </view>
    <view class="performer_item">
      <view class="performer_text">
        朱重八
        <text class="idcard">身份证：441***********321X</text>
      </view>
      <radio class="performer_radio" value="r2" />
    </view>
  </view>


  <view class="performer_view">
    <view class="performer_top_view">
      <view class="performer_left">
        <view class="performer_name">
          取票方式：现场
        </view>
        <view class="performer_desc">
          无需取票，前往票夹查看入场二维码
        </view>
      </view>
    </view>
  </view>


  <view class="info_view">
    <view class="info_item_view">
      <view class="info">价格</view>
      <view class="info">￥80</view>
    </view>
    <view class="info_item_view">
      <view class="info">快递费</view>
      <view class="info">￥0</view>
    </view>
    <view class="info_item_view">
      <view class="info">优惠券</view>
      <view class="info">无可用优惠券
        <image class="info_image" src="/static/home/arrow_right.png" mode="scaleToFill"></image>
      </view>
    </view>
    <view class="info_item_view">
      <view class="info">支付方式</view>
      <view class="info">在线支付</view>
    </view>
    <view class="info_item_view">
      <view class="info">商品金额</view>
      <view class="info">商品金额</view>
    </view>

    <view class="info_item_view">
      <view class="info"></view>
      <view class="info">合计：￥160</view>
    </view>
  </view>

  <view class="pay_view">
    <view class="pay_info">
      <text class="pay_txt">
        应付
      </text>
      <text class="pay_txt1">
        ￥
      </text>
      <text class="pay_txt2">
        160
      </text>
    </view>
    <view class="pay_btn" @click="to_order()">
      立即支付
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        item: {
          src: "/static/material/m5.png",
          title: '薛之谦2023中国巡演-广州站薛之谦2023中国巡演',
          address: '广州· 正佳广场',
          time: '2023.09.13 周日 18:00',
          money: 99,
        }
      }
    },
    methods: {
      to_order() {
        uni.navigateTo({
          url: '/pages/index/order'
        })
      }
    }
  }
</script>

<style scoped lang="scss">
  .goods_view {
    width: 90%;
    margin: 10px 5%;
    padding: 10px 0;
    background-color: white;
    border-radius: 10px;
    position: relative;

    .goods_round_top_view {
      position: absolute;
      width: 10px;
      height: 20px;
      border-top-right-radius: 10px;
      border-bottom-right-radius: 10px;
      top: 70%;
      left: 0;
      background-color: #F8F8F8;
      display: flex;
      justify-content: space-around;
    }

    .goods_line_view {
      position: absolute;
      height: 0px;
      left: 10px;
      right: 10px;
      top: calc(70% + 10px);
      border-top: #333333 1px dashed;
      opacity: 0.5;
    }

    .goods_round_bottom_view {
      position: absolute;
      width: 10px;
      height: 20px;
      border-top-left-radius: 10px;
      border-bottom-left-radius: 10px;
      top: 70%;
      right: 0;
      background-color: #F8F8F8;
    }

    .goods_info_view {
      display: flex;
      margin: 20px;
      position: relative;

      .goods_image {
        width: 100px;
        height: 130px;
        border-radius: 10px;
      }


      .goods_right_view {
        position: relative;
        margin-left: 20px;

        .sell_title {
          height: 60px;
          line-height: 30px;
          font-size: 18px;
          font-weight: 600;
          text-align: LEFT;
          color: #333333;
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
        }

        .sell_desc {
          height: 18px;
          font-size: 14px;
          font-weight: 400;
          text-align: LEFT;
          color: #9B9B9B;
          margin-top: 10px;
        }
      }

      .ticket_name_view {
        position: absolute;
        right: 0;
        bottom: 5px;
        color: #FD5359;
        width: 50px;
        height: 25px;
        line-height: 25px;
        background: rgba(253, 83, 89, 0.2);
        border-radius: 4px;
        text-align: center;
        font-size: 11px;
      }
    }

    .ticket_view {
      margin: 50px 20px 10px 20px;
      height: 20px;
      display: flex;
      justify-content: space-between;

      .ticket_left {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
      }

      .ticket_right {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
      }
    }
  }

  .performer_view {
    width: 90%;
    margin: 10px 5%;
    padding: 20px 0;
    background-color: white;
    border-radius: 10px;

    .performer_top_view {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .performer_left {
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: flex-start;
        text-align: left;

        .performer_name {
          font-size: 14px;
          width: 200px;
          font-weight: 600;
          color: #333333;
          margin-left: 20px;
        }

        .performer_desc {
          font-size: 12px;
          width: 200px;
          font-weight: 400;
          color: #c7c7c7;
          margin-left: 20px;
          margin-top: 10px;
        }
      }

      .performer_add {
        width: 50px;
        height: 28px;
        line-height: 28px;
        text-align: center;
        border: 1px solid #333333;
        border-radius: 4px;
        font-size: 15px;
        margin-right: 20px;
      }

    }

    .performer_item {
      margin: 10px 20px;
      height: 50px;
      line-height: 50px;
      background: #f8f8f8;
      border-radius: 4px;
      font-size: 15px;
      font-weight: 600;
      color: #333333;
      padding-left: 10px;

      display: flex;
      justify-content: space-between;

      .idcard {
        font-weight: 400;
        color: #9b9b9b;
      }

      .performer_radio {
        margin-right: 10px;
        transform: scale(0.8)
      }
    }
  }


  .info_view {
    width: 90%;
    margin: 10px 5%;
    padding: 20px 0;
    background-color: white;
    border-radius: 10px;
    background-color: white;

    .info_item_view {
      margin: 20px;
      display: flex;
      justify-content: space-between;

      .info {
        font-size: 16px;
        font-weight: 400;
        color: #333333;

        .info_image {
          width: 10px;
          height: 10px;
        }
      }

    }
  }

  .pay_view {
    width: 100%;
    height: 80px;
    background-color: #fff;
    padding: 20px 0;
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    border-top: 1px #DCDCDC solid;

    .pay_info {
      height: 30px;

      .pay_txt {
        font-size: 13px;
        font-weight: 500;
        color: #9b9b9b;
        margin-left: 20px;
      }

      .pay_txt1 {
        font-size: 17px;
        font-weight: 600;
        color: #ff0000;
      }

      .pay_txt2 {
        font-size: 24px;
        font-weight: 600;
        color: #ff0000;
      }
    }

    .pay_btn {
      width: 160px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      margin: 0 5%;
      background: #fd5359;
      border-radius: 20px;
      color: white;
      font-size: 18px;
    }
  }
</style>